<template>
  <div class="iframe" ref="iframe"></div>
</template>

<script>
import { createIframe } from './index'

export default {
    name: 'IframeComponent',
    mounted () {
        this.init()
    },
    methods: {
        init () {
            console.log(this.$refs.iframe)
            debugger
            const url = 'https://vod.300hu.com/4c1f7a6atransbjngwcloud1oss/4f9747cd241241042224418817/v.f30.mp4?dockingId=178407c5-4f12-4044-a207-d21a03af567b&storageSource=3'
            createIframe(this.$refs.iframe, url, onload)
        },
        onload () {
            console.log('res')
        }
    }
}
</script>